import {
	observer
} from 'mobx-react';
import {
	WeaTab
} from 'ecCom';

@observer
export default class Tab extends React.Component {
	constructor(props) {
		super(props);
	}

	render() {
		const {
			store
		} = this.props, {
			TAB,
			tab,
			tabDatas,
			searchsBaseValue,
			searchType,
			tabButtons,
		} = store, {
			form
		} = tab;

		return (
			<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@jcn4su`} 
				{...TAB}
				{...tab}
				datas={tabDatas}
				buttons={tabButtons}
				searchType={searchType}
				searchsBaseValue={searchsBaseValue}
				searchsAd={<div>{form.render()}</div>}
			/>
		);
	}
}